package com.t2t.top.xsd;


import org.xml.sax.ErrorHandler;
import org.xml.sax.SAXException;
import org.xml.sax.SAXParseException;

class SimpleErrorHandler implements ErrorHandler {
    private boolean errorResult = true;

    public void warning(SAXParseException e) throws SAXException {
        System.out.println("waring:" + e.getMessage());
    }

    public void error(SAXParseException e) throws SAXException {
        setErrorResult(false);
        System.out.println("error:" + e.getMessage());
    }

    public void fatalError(SAXParseException e) throws SAXException {
        System.out.println("fatalError:" + e.getMessage());
    }

    public boolean isErrorResult() {
        return errorResult;
    }

    public void setErrorResult(boolean errorResult) {
        this.errorResult = errorResult;
    }
}
